﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Mathmall.Administration.Migrations
{
    /// <inheritdoc />
    public partial class ChangeAttrTableFieldsToNvarchar : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "ValueSelect",
                table: "Attr",
                type: "nvarchar(255)",
                nullable: true,
                comment: "可选值列表[用逗号分隔]",
                oldClrType: typeof(string),
                oldType: "char(255)",
                oldNullable: true,
                oldComment: "可选值列表[用逗号分隔]");

            migrationBuilder.AlterColumn<string>(
                name: "AttrName",
                table: "Attr",
                type: "nvarchar(30)",
                nullable: false,
                comment: "属性名",
                oldClrType: typeof(string),
                oldType: "char(30)",
                oldComment: "属性名");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "ValueSelect",
                table: "Attr",
                type: "char(255)",
                nullable: true,
                comment: "可选值列表[用逗号分隔]",
                oldClrType: typeof(string),
                oldType: "nvarchar(255)",
                oldNullable: true,
                oldComment: "可选值列表[用逗号分隔]");

            migrationBuilder.AlterColumn<string>(
                name: "AttrName",
                table: "Attr",
                type: "char(30)",
                nullable: false,
                comment: "属性名",
                oldClrType: typeof(string),
                oldType: "nvarchar(30)",
                oldComment: "属性名");
        }
    }
}
